#include<stdio.h>
int fob_nerqr(int n)
{
	int a = 1;
	int b = 1;
	int c = 1;
	
	while (n > 2)
	{
		if (n > 2)
		{
			c = a + b;
			a = b;
			b = c;
			n--;
		}
	}
	return c;
}
int main()
{
	int n = 0;
	int re = 0;
	scanf_s("%d", &n);
	re = fob_nerqr(n);
	printf("%d", re);
	return 0;
}
